import request from '@/utils/request'

// 查询系统公告列表
export function listSysnotice(query) {
  return request({
    url: '/work/noticsystem/list',
    method: 'get',
    params: query
  })
}

// 查询系统公告详细
export function getSysnotice(id) {
  return request({
    url: '/work/noticsystem/' + id,
    method: 'get'
  })
}

// 新增系统公告
export function addSysnotice(data) {
  return request({
    url: '/work/noticsystem/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改系统公告
export function updateSysnotice(data) {
  return request({
    url: '/work/noticsystem/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除系统公告
export function delSysnotice(id) {
  return request({
    url: '/work/noticsystem/delete-by-id',
    method: 'get',
    params: { "id": id }
  })
}

export function delSysnotices(ids) {
  return request({
    url: '/work/noticsystem/delete-by-ids',
    method: 'get',
    params: { "ids": ids }
  })
}
